<%@page contentType="text/html; charset=GBK" pageEncoding="GBK"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@page import="com.caac.core.util.Fonts"%>
<html>
<head>
</head>
<body>
<link href="css/light/Editor.css" type="text/css" rel="stylesheet">
<Script Language=Javascript>
	var sLinkFieldName = "initValue" ;
	//set Global object
	var config = new Object() ;
	config.Version = "2.0.0 beta" ;
	config.ReleaseDate = "2004-02-04" ;
	config.StyleName = "standard_blue";
	config.StyleEditorHeader = "<head><link href=\"css/light/EditorArea.css\" type=\"text/css\" rel=\"stylesheet\"></head><body MONOSPACE>" ;
	config.StyleMenuHeader = "<head><link href=\"css/light/MenuArea.css\" type=\"text/css\" rel=\"stylesheet\"></head><body scroll=\"no\" onConTextMenu=\"event.returnValue=false;\">";
	config.StyleDir = "standard";
	config.StyleUploadDir = "UploadFile";
	config.InitMode = "EDIT";
	config.AutoDetectPasteFromWord = true;
	config.BaseUrl = true;
</Script><Script Language=Javascript src="include/editor.js"></Script><Script Language=Javascript src="include/table.js"></Script><Script language=Javascript>
var sMenuHr="<tr><td align=center valign=middle height=2><TABLE border=0 cellpadding=0 cellspacing=0 width=128 height=2><tr><td height=1 class=HrShadow><\/td><\/tr><tr><td height=1 class=HrHighLight><\/td><\/tr><\/TABLE><\/td><\/tr>";
var sMenu1="<TABLE border=0 cellpadding=0 cellspacing=0 class=Menu width=150><tr><td width=18 valign=bottom align=center ><\/td><td width=132 class=RightBg><TABLE border=0 cellpadding=0 cellspacing=0>";
var sMenu2="<\/TABLE><\/td><\/tr><\/TABLE>";

var phNames = new Array();
var phClassNames = new Array();
var phMaxTimes = new Array();
var phMinTimes = new Array();

function doPhCreate(){
    var phIndex = document.getElementById('placeholder').selectedIndex;
    if(phIndex > 0){
        var phValue = document.getElementById('placeholder').options[phIndex].value;
        if(phMaxTimes[phIndex] < 100){
            var contentValue = getHTML();
            if(getStringTimes(contentValue, phValue) >= phMaxTimes[phIndex]){
                alert("<bean:message bundle='webEditor' key='webEditor.ph.maxtimes' /> " + phMaxTimes[phIndex] + " <bean:message bundle='webEditor' key='webEditor.ph.times' />" + phNames[phIndex]);
                return;
            }
        }
        goPhCreate(phValue);
    }
}

function goPhCreate(phValue){
	<logic:present name="phTypes">
	<logic:present name="pageID">
    ShowDialogPh('<html:rewrite page="/assembly/action/phDInitCreate.do" />?pageID=<bean:write name="pageID" ignore="true" />&phType=' + phValue , 550, 405, true);
	</logic:present>
    </logic:present>
}

function doPageSave(){
    var alertValue = "";
    var contentValue = getHTML();
    for(var i = 1; i <= phMinTimes.length; i++){
        if(phMinTimes[i] > 0){
            if(getStringTimes(contentValue, phClassNames[i]) < phMinTimes[i]){
                alertValue += "<bean:message bundle='webEditor' key='webEditor.ph.mintimes' /> " + phMinTimes[i] + " <bean:message bundle='webEditor' key='webEditor.ph.times' />" + phNames[i] + "\n";
            }
        }
    }
    return alertValue;
}

function getStringTimes(source, reg){
    return source.split(reg).length - 1;
}

function getMenuRow(s_Disabled, s_Event, s_Image, s_Html) {
	var s_MenuRow = "";
	s_MenuRow = "<tr><td align=center valign=middle><TABLE border=0 cellpadding=0 cellspacing=0 width=132><tr "+s_Disabled+"><td valign=middle height=20 class=MouseOut onMouseOver=this.className='MouseOver'; onMouseOut=this.className='MouseOut';";
	if (s_Disabled==""){
		s_MenuRow += " onclick=\"parent."+s_Event+";parent.oPopupMenu.hide();\"";
	}
	s_MenuRow += ">"
	if (s_Image !=""){
		s_MenuRow += "&nbsp;<img border=0 src='buttonimage/"+config.StyleDir+"/"+s_Image+"' width=20 height=20 align=absmiddle "+s_Disabled+">&nbsp;";
	}else{
		s_MenuRow += "&nbsp;";
	}
	s_MenuRow += s_Html+"<\/td><\/tr><\/TABLE><\/td><\/tr>";
	return s_MenuRow;

}

function getFormatMenuRow(menu, html, image){
	var s_Disabled = "";
	if (!eWebEditor.document.queryCommandEnabled(menu)){
		s_Disabled = "disabled";
	}
	var s_Event = "format('"+menu+"')";
	var s_Image = menu+".gif";
	if (image){
		s_Image = image;
	}
	return getMenuRow(s_Disabled, s_Event, s_Image, html)
}

function getTableMenuRow(what){
	var s_Menu = "";
	var s_Disabled = "disabled";
	switch(what){
	case "TableInsert":
		if (!isTableSelected()) s_Disabled="";
		s_Menu += getMenuRow(s_Disabled, "TableInsert()", "TableInsert.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableInsert' />")
		break;
	case "TableProp":
		if (isTableSelected()||isCursorInTableCell()) s_Disabled="";
		s_Menu += getMenuRow(s_Disabled, "TableProp()", "TableProp.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableProp' />")
		break;
	case "TableCell":
		if (isCursorInTableCell()) s_Disabled="";
		s_Menu += getMenuRow(s_Disabled, "TableCellProp()", "TableCellProp.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.CellProperties' />")
		s_Menu += getMenuRow(s_Disabled, "TableCellSplit()", "TableCellSplit.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableCellSplit' />")
		s_Menu += sMenuHr;
		s_Menu += getMenuRow(s_Disabled, "TableRowProp()", "TableRowProp.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableRowProp' />")
		s_Menu += getMenuRow(s_Disabled, "TableRowInsertAbove()", "TableRowInsertAbove.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableRowInsertAbove' />");
		s_Menu += getMenuRow(s_Disabled, "TableRowInsertBelow()", "TableRowInsertBelow.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableRowInsertBelow' />");
		s_Menu += getMenuRow(s_Disabled, "TableRowMerge()", "TableRowMerge.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableRowMerge' />");
		s_Menu += getMenuRow(s_Disabled, "TableRowSplit(2)", "TableRowSplit.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableRowSplit' />");
		s_Menu += getMenuRow(s_Disabled, "TableRowDelete()", "TableRowDelete.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableRowDelete' />");
		s_Menu += sMenuHr;
		s_Menu += getMenuRow(s_Disabled, "TableColInsertLeft()", "TableColInsertLeft.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableColInsertLeft' />");
		s_Menu += getMenuRow(s_Disabled, "TableColInsertRight()", "TableColInsertRight.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableColInsertRight' />");
		s_Menu += getMenuRow(s_Disabled, "TableColMerge()", "TableColMerge.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableColMerge' />");
		s_Menu += getMenuRow(s_Disabled, "TableColSplit(2)", "TableColSplit.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableColSplit' />");
		s_Menu += getMenuRow(s_Disabled, "TableColDelete()", "TableColDelete.gif", "<bean:message bundle='webEditor' key='webEditor.InsertTable.TableColDelete' />");
		break;
	}
	return s_Menu;
}

var oPopupMenu = window.createPopup();
function showContextMenu(event){

	if (!bEditMode) return false;

	var width = 150;
	var height = 0;
	var lefter = event.clientX;
	var topper = event.clientY;

	var oPopDocument = oPopupMenu.document;
	var oPopBody = oPopupMenu.document.body;

	var sMenu="";

	sMenu += getFormatMenuRow("cut", "<bean:message bundle='webEditor' key='webEditor.Cut' />");
	sMenu += getFormatMenuRow("copy", "<bean:message bundle='webEditor' key='webEditor.Copy' />");
	sMenu += getFormatMenuRow("paste", "<bean:message bundle='webEditor' key='webEditor.Paste' />");
	sMenu += getFormatMenuRow("delete", "<bean:message bundle='webEditor' key='webEditor.Delete' />");
	sMenu += getFormatMenuRow("selectAll", "<bean:message bundle='webEditor' key='webEditor.SelectAll' />");
	sMenu += sMenuHr;
	height += 102;

	if (isCursorInTableCell()){
		sMenu += getTableMenuRow("TableProp");
		sMenu += getTableMenuRow("TableCell");
		sMenu += sMenuHr;
		height += 286;
	}

	if (isControlSelected("TABLE")){
		sMenu += getTableMenuRow("TableProp");
		sMenu += sMenuHr;
		height += 22;
	}

	if (isControlSelected("IMG")){
		if (eWebEditor.document.selection.type == "Control") {
 		  var oControlRange = eWebEditor.document.selection.createRange();
 		  if (oControlRange(0).tagName.toUpperCase() == 'IMG') {
			  var classpara=oControlRange(0).getAttribute('id');
 		   }
	     }

 		var index=classpara.indexOf("!*!");

		 if(index>0){
			var objectID=classpara.substring(0,index);
            sMenu += getMenuRow("", "ShowDialogPh('<html:rewrite page='/assembly/action/phDInitModify.do' />?phID=" + objectID + "', 550, 405, true)", "img.gif", "<bean:message bundle='webEditor' key='webEditor.PlaceholderPop' />");
		    sMenu += sMenuHr;

		}
		else{
			sMenu += getMenuRow("", "ShowDialog('dialog/img.jsp', 350, 320, true)", "img.gif", "<bean:message bundle='webEditor' key='webEditor.ImagePop' />");
			sMenu += sMenuHr;
			sMenu += getMenuRow("", "zIndex('forward')", "forward.gif", "<bean:message bundle='webEditor' key='webEditor.Forward' />");
			sMenu += getMenuRow("", "zIndex('backward')", "backward.gif", "<bean:message bundle='webEditor' key='webEditor.Backward' />");
			sMenu += sMenuHr;
			height += 64;
		  }

	}

	sMenu += getMenuRow("", "findReplace()", "findreplace.gif", "<bean:message bundle='webEditor' key='webEditor.FindReplace' />");
	height += 20;

	sMenu = sMenu1 + sMenu + sMenu2;

	oPopDocument.open();
	oPopDocument.write(config.StyleMenuHeader+sMenu);
	oPopDocument.close();

	height+=2;
	if(lefter+width > document.body.clientWidth) lefter=lefter-width;
	//if(topper+height > document.body.clientHeight) topper=topper-height;

	oPopupMenu.show(lefter, topper, width, height, eWebEditor.document.body);
	return false;

}


function showToolMenu(menu){
	if (!bEditMode) return false;
	var sMenu = ""
	var width = 150;
	var height = 0;

	var lefter = event.clientX;
	var leftoff = event.offsetX
	var topper = event.clientY;
	var topoff = event.offsetY;

	var oPopDocument = oPopupMenu.document;
	var oPopBody = oPopupMenu.document.body;

	switch(menu){
	case "paste":

		break;
	case "table":
		sMenu += getTableMenuRow("TableInsert");
		sMenu += getTableMenuRow("TableProp");
		sMenu += sMenuHr;
		sMenu += getTableMenuRow("TableCell");
		height = 306;
		break;
	case "form":
		sMenu += getFormatMenuRow("InsertInputText", "<bean:message bundle='webEditor' key='webEditor.TableMenu.InsertInputText' />", "formtext.gif");
		sMenu += getFormatMenuRow("InsertTextArea", "<bean:message bundle='webEditor' key='webEditor.TableMenu.InsertTextArea' />", "formtextarea.gif");
		sMenu += getFormatMenuRow("InsertInputRadio", "<bean:message bundle='webEditor' key='webEditor.TableMenu.InsertInputRadio' />", "formradio.gif");
		sMenu += getFormatMenuRow("InsertInputCheckbox", "<bean:message bundle='webEditor' key='webEditor.TableMenu.InsertInputCheckbox' />", "formcheckbox.gif");
		sMenu += getFormatMenuRow("InsertSelectDropdown", "<bean:message bundle='webEditor' key='webEditor.TableMenu.InsertSelectDropdown' />", "formdropdown.gif");
		sMenu += getFormatMenuRow("InsertButton", "<bean:message bundle='webEditor' key='webEditor.TableMenu.InsertButton' />", "formbutton.gif");
		height = 120;
		break;
	case "zoom":
		for (var i=0; i<aZoomSize.length; i++){
			if (aZoomSize[i]==nCurrZoomSize){
				sMenu += getMenuRow("", "doZoom("+aZoomSize[i]+")", "checked.gif", aZoomSize[i]+"%")
			}else{
				sMenu += getMenuRow("", "doZoom("+aZoomSize[i]+")", "space.gif", aZoomSize[i]+"%")
			}
			height += 20;
		}
		break;
	}

	sMenu = sMenu1 + sMenu + sMenu2;

	oPopDocument.open();
	oPopDocument.write(config.StyleMenuHeader+sMenu);
	oPopDocument.close();

	height+=2;
	if(lefter+width > document.body.clientWidth) lefter=lefter-width;
	//if(topper+height > document.body.clientHeight) topper=topper-height;

	oPopupMenu.show(lefter - leftoff - 2, topper - topoff + 22, width, height, document.body);

	return false;
}
</script>

<script language=javascript>
function validateMode() {
	if (bEditMode) return true;
	alert('<bean:message bundle="webEditor" key="webEditor.EditMode.alert" />');
	eWebEditor.focus();
	return false;
}
function PasteWord(){
	if (!validateMode()) return;
	eWebEditor.focus();
	if (BrowserInfo.IsIE55OrMore)
		cleanAndPaste( GetClipboardHTML() ) ;
	else if ( confirm('<bean:message bundle="webEditor" key="webEditor.PasteWord.alert" />' ) )
		format("paste") ;
	eWebEditor.focus();
}
function onPaste() {
	if (config.AutoDetectPasteFromWord && BrowserInfo.IsIE55OrMore) {
		var sHTML = GetClipboardHTML() ;
		var re = /<\w[^>]* class="?MsoNormal"?/gi ;
		if ( re.test( sHTML ) )
		{
			if ( confirm( "" ) )
			{
				cleanAndPaste( sHTML ) ;
				return false ;
			}
		}
	}
	else
		return true ;
}

</script><table align=center border=0 cellpadding=0 cellspacing=2 width='100%' height='390' bgColor="#9EBEF5">
  <tr>
    <td>
      <table border=0 cellpadding=0 cellspacing=0 width='100%' class='Toolbar' id='eWebEditor_Toolbar'>
        <tr>
          <td>
            <div class=yToolbar>
              <DIV CLASS="TBHandle">              </DIV>
              <SELECT CLASS="TBGen" onchange="format('FormatBlock',this[this.selectedIndex].value);this.selectedIndex=0">
                <option selected>
                  <bean:message bundle="webEditor" key="webEditor.paragraph"/>
                </option>
                <option value="&lt;P&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.1"/>
                </option>
                <option value="&lt;H1&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.2"/>
                </option>
                <option value="&lt;H2&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.3"/>
                </option>
                <option value="&lt;H3&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.4"/>
                </option>
                <option value="&lt;H4&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.5"/>
                </option>
                <option value="&lt;H5&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.6"/>
                </option>
                <option value="&lt;H6&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.7"/>
                </option>
                <option value="&lt;p&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.8"/>
                </option>
                <option value="&lt;dd&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.9"/>
                </option>
                <option value="&lt;dt&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.10"/>
                </option>
                <option value="&lt;dir&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.11"/>
                </option>
                <option value="&lt;menu&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.12"/>
                </option>
                <option value="&lt;PRE&gt;">
                  <bean:message bundle="webEditor" key="webEditor.paragraph.option.13"/>
                </option>
              </SELECT>
              <SELECT CLASS="TBGen" onchange="format('fontname',this[this.selectedIndex].value);this.selectedIndex=0">
                <option selected>
                  <bean:message bundle="webEditor" key="webEditor.Font"/>
                </option>
              <%
                Fonts fonts = new Fonts(request);
                String[] fontFamilyNames = fonts.getFontFamilyNames();
                for (int i = 0; i < fontFamilyNames.length; i++) {
                  out.println("<option value=\"" + fontFamilyNames[i] + "\">" + fontFamilyNames[i] + "</option>");
                }
              %>
              </SELECT>
              <SELECT CLASS="TBGen" onchange="format('fontsize',this[this.selectedIndex].value);this.selectedIndex=0">
                <option selected>
                  <bean:message bundle="webEditor" key="webEditor.FontSize"/>
                </option>
                <option value="7">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.1"/>
                </option>
                <option value="6">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.2"/>
                </option>
                <option value="5">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.3"/>
                </option>
                <option value="4">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.4"/>
                </option>
                <option value="3">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.5"/>
                </option>
                <option value="2">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.6"/>
                </option>
                <option value="1">
                  <bean:message bundle="webEditor" key="webEditor.FontSize.option.7"/>
                </option>
              </SELECT>
              <SELECT CLASS="TBGen" onchange="doZoom(this[this.selectedIndex].value)">
                <option value="10">10%</option>
                <option value="25">25%</option>
                <option value="50">50%</option>
                <option value="75">75%</option>
                <option value="100" selected>100%</option>
                <option value="150">150%</option>
                <option value="200">200%</option>
                <option value="500">500%</option>
              </SELECT>
              <DIV CLASS="TBHandle">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Bold" />' onclick="format('bold')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/bold.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Italic" />' onclick="format('italic')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/italic.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Underline" />' onclick="format('underline')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/underline.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.StrikeThrough" />' onclick="format('StrikeThrough')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/strikethrough.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Superscript" />' onclick="format('superscript')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/superscript.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Subscript" />' onclick="format('subscript')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/subscript.gif">
              </DIV>
            </div>
          </td>
        </tr>
        <tr>
          <td>
            <div class=yToolbar>
              <DIV CLASS="TBHandle">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.LeftJustify" />' onclick="format('justifyleft')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/JustifyLeft.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.CenterJustify" />' onclick="format('justifycenter')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/JustifyCenter.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.RightJustify" />' onclick="format('justifyright')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/JustifyRight.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.BlockJustify" />' onclick="format('JustifyFull')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/JustifyFull.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Cut" />' onclick="format('cut')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/cut.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Copy" />' onclick="format('copy')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/copy.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Paste" />' onclick="format('paste')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/paste.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.PasteText" />' onclick="PasteText()">
                <IMG CLASS="Ico" SRC="buttonimage/standard/pastetext.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.PasteWord" />' onclick="PasteWord()">
                <IMG CLASS="Ico" SRC="buttonimage/standard/pasteword.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Find" />' onclick="findReplace()">
                <IMG CLASS="Ico" SRC="buttonimage/standard/findreplace.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Delete" />' onclick="format('delete')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/delete.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.RemoveFormat" />' onclick="format('RemoveFormat')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/RemoveFormat.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Undo" />' onclick="format('undo')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/undo.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Redo" />' onclick="format('redo')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/redo.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.SelectAll" />' onclick="format('SelectAll')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/selectAll.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.CancleSelect" />' onclick="format('Unselect')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/unselect.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.NumberedList" />' onclick="format('insertorderedlist')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/insertorderedlist.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.BulettedList" />' onclick="format('insertunorderedlist')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/insertunorderedlist.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.IncreaseIndent" />' onclick="format('indent')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/indent.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.DecreaseIndent" />' onclick="format('outdent')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/outdent.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.TextColor" />' onclick="ShowDialog1('dialog/selcolor.jsp?action=forecolor', 300, 265, true,'forecolor')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/forecolor.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.BGColor" />' onclick="ShowDialog1('dialog/selcolor.jsp?action=backcolor', 300, 265, true,'backcolor')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/backcolor.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.BackImage" />' onclick="ShowDialog('dialog/backimage.jsp', 370, 225, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/bgpic.gif">
              </DIV>
            </div>
          </td>
        </tr>
         <tr>
          <td>
            <div class=yToolbar>
              <DIV CLASS="TBHandle">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.AbsolutePosition" />' onclick="absolutePosition()">
                <IMG CLASS="Ico" SRC="buttonimage/standard/abspos.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Forward" />' onclick="zIndex('forward')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/forward.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Backward" />' onclick="zIndex('backward')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/backward.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertImage" />' onclick="ShowDialog('dialog/img.jsp', 350, 320, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/img.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertFlash" />' onclick="ShowDialog('dialog/flash.jsp', 350, 205, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/flash.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertMedia" />' onclick="ShowDialog('dialog/media.jsp', 350, 205, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/Media.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertFile" />' onclick="ShowDialog('dialog/file.jsp', 350, 155, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/file.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertTable" />' onclick="showToolMenu('table')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/tablemenu.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.TableMenu" />' onclick="showToolMenu('form')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/FormMenu.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.ShowTableBorders" />' onclick="showBorders()">
                <IMG CLASS="Ico" SRC="buttonimage/standard/ShowBorders.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertFieldset" />' onclick="ShowDialog('dialog/fieldset.jsp', 365, 185, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/fieldset.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertIframe" />' onclick="ShowDialog('dialog/iframe.jsp', 365, 215, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/iframe.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertHorizontalRule" />' onclick="format('InsertHorizontalRule')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/InsertHorizontalRule.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.Marquee" />' onclick="ShowDialog('dialog/marquee.jsp', 405, 155, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/Marquee.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertLink" />' onclick="format('CreateLink')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/CreateLink.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.RemoveLink" />' onclick="format('UnLink')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/Unlink.gif">
              </DIV>
              <DIV CLASS="TBSep">              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertSpecialChar" />' onclick="ShowDialog('dialog/symbol.jsp', 350, 225, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/symbol.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertSmiley" />' onclick="ShowDialog('dialog/emot.jsp', 300, 185, true)">
                <IMG CLASS="Ico" SRC="buttonimage/standard/emot.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertExcel" />' onclick="insert('excel')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/excel.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertDate" />' onclick="insert('nowdate')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/date.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.InsertTime" />' onclick="insert('nowtime')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/time.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.QuoteStyle" />' onclick="insert('quote')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/quote.gif">
              </DIV>
              <DIV CLASS="Btn" TITLE='<bean:message bundle="webEditor"  key="webEditor.CodeStyle" />' onclick="insert('code')">
                <IMG CLASS="Ico" SRC="buttonimage/standard/code.gif">
              </DIV>
            <%
              String showPh = request.getParameter("showPh");
              if (showPh != null) {
            %>
              <logic:present name="phTypes">
                <logic:present name="pageID">
                  <table>
                    <tr>
                      <td>
                        <select id="placeholder">
                          <option selected>
                            <bean:message bundle="webEditor" key="webEditor.ph.note"/>
                          </option>
                          <logic:iterate name="phTypes" id="phType" indexId="indexId">
                            <bean:define name="phType" property="bundle" id="bundle"/>
                            <bean:define name="phType" property="nameKey" id="nameKey"/>
                            <bean:define name="phType" property="icon" id="icon"/>
                            <option value="<bean:write name="phType" property="className" />">
                              <bean:message bundle="<%=(String)bundle %>" key="<%= (String)nameKey %>"/>
                              [
                              <bean:write name="phType" property="minTimes"/>
                              ~
                              <logic:equal name="phType" property="maxTimes" value="1024">*</logic:equal>
                              <logic:notEqual name="phType" property="maxTimes" value="1024">
                                <bean:write name="phType" property="maxTimes"/>
                              </logic:notEqual>
                              <bean:message key="ph.times"/>
                              ]
                            </option>
<script language="javascript">
                                      phNames[<%= (indexId.intValue() + 1) %>] = '<bean:message bundle="<%= (String)bundle %>" key="<%= (String)nameKey %>" />';
                                      phClassNames[<%= (indexId.intValue() + 1) %>] = '<bean:write name="phType" property="class.name" />';
                                      phMaxTimes[<%= (indexId.intValue() + 1) %>] = <bean:write name="phType" property="maxTimes" />;
                                      phMinTimes[<%= (indexId.intValue() + 1) %>] = <bean:write name="phType" property="minTimes" />;
                                    </script>                          </logic:iterate>
                        </select>
                      </td>
                      <td>
                        <input type="button" value="<bean:message key="button.submit" />" onclick="doPhCreate();" style="BORDER-RIGHT: #cccccc 1px solid; BORDER-TOP: #cccccc 1px solid; FONT-SIZE: 9pt; BORDER-LEFT: #cccccc 1px solid; BORDER-BOTTOM: #cccccc 1px solid; HEIGHT: 18px; BACKGROUND-COLOR: #ffffff">
                      </td>
                    </tr>
                  </table>
                </logic:present>
              </logic:present>
            <%}            %>
            </div>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height='100%'>
      <table border=0 cellpadding=0 cellspacing=0 width='100%' height='100%'>
        <tr>
          <td height='100%'>
            <input type="hidden" ID="ContentEdit" value="">
            <input type="hidden" ID="ContentLoad" value="">
            <input type="hidden" ID="ContentFlag" value="0">
            <iframe class="Composition" ID="eWebEditor" MARGINHEIGHT="1" MARGINWIDTH="1" width="100%" height="100%" scrolling="yes">            </iframe>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td height=25>
      <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%" class=StatusBar height=25>
        <TR valign=middle>
          <td>
            <table border=0 cellpadding=0 cellspacing=0 height=20>
              <tr>
                <td width=10>                </td>
                <td class=StatusBarBtnOff id=eWebEditor_CODE onclick="setMode('CODE')">
                  <img border=0 src='<bean:message bundle="webEditor"  key="webEditor.ModeCode" />' width=50 height=15 align=absmiddle>
                </td>
                <td width=5>                </td>
                <td class=StatusBarBtnOff id=eWebEditor_EDIT onclick="setMode('EDIT')">
                  <img border=0 src='<bean:message bundle="webEditor"  key="webEditor.ModeEdit" />' width=50 height=15 align=absmiddle>
                </td>
                <td width=5>                </td>
                <td class=StatusBarBtnOff id=eWebEditor_VIEW onclick="setMode('VIEW')">
                  <img border=0 src='<bean:message bundle="webEditor"  key="webEditor.ModePreview" />' width=50 height=15 align=absmiddle>
                </td>
              </tr>
            </table>
          </td>
        </TR>
      </Table>
    </td>
  </tr>
</table>
</body>
</html>
